import '../mine/base_res.dart';

class MessageDynamicModel extends BaseItem {
  List<MessageDynamicList>? list;
  bool? hasNext;
  MessageDynamicModel.fromJson(dynamic json) {
    hasNext = json['hasNext'];
    if (json['list'] != null) {
      list = [];
      json['list'].forEach((v) {
        list?.add(MessageDynamicList.fromJson(v));
      });
    }
  }
}

class MessageDynamicList extends BaseItem {
  MessageDynamicList({
    this.createdAt,
    this.id,
    this.sendGender,
    this.content,
    this.sendUid,
    this.objId,
    this.sendAvatar,
    this.vipLevel,
    this.msgType,
    this.sendName,
    this.objName,
  });

  MessageDynamicList.fromJson(Map<String, dynamic> json) {
    createdAt = json['createdAt'];
    id = json['id'];
    sendGender = json['sendGender'];
    content = json['content'];
    sendUid = json['sendUid'];
    createdAt = json['createdAt'];
    objId = json['objId'];
    sendAvatar = json['sendAvatar'];
    vipLevel = json['vipLevel'];
    msgType = json['msgType'] ?? "";
    objName = json['objName'];
    isRead = json['isRead'];
    superUser = json['superUser'];
    awards = List<int>.from((json['awards'] as List?) ?? []);
    imgUrl = json['imgUrl'];
    vipExpireDateOmitempty = json['vipExpireDateOmitempty'];
    objCover = json['objCover'];
    sendName = json['sendName'];
    likeCount = json['likeCount'];
  }
  String? id;
  int? sendUid;
  String? sendName;
  String? sendAvatar;
  String? sendGender;
  int? superUser;
  List<int>? awards;
  String? msgType;
  String? content;
  String? imgUrl;
  bool? isRead;
  String? objId;
  String? objName;
  String? createdAt;
  int? likeCount;
  String? vipExpireDateOmitempty;
  int? vipLevel;
  String? objCover;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['createdAt'] = createdAt;
    map['id'] = id;
    map['sendGender'] = sendGender;
    map['content'] = content;
    map['sendUid'] = sendUid;

    map['objId'] = objId;
    map['sendAvatar'] = sendAvatar;
    map['vipLevel'] = vipLevel;
    map['msgType'] = msgType;
    map['objName'] = objName;
    map['isRead'] = isRead;

    map['sendName'] = sendName;
    return map;
  }

  @override
  fromJson(json) {
    MessageDynamicList.fromJson(json);
  }
}
